<?php
$this->breadcrumbs = array(
    'Films' => array('index'),
    $model->id => array('view', 'id' => $model->id),
    'Update',
);

$this->menu = array(
    array('label' => 'List Film', 'url' => array('index')),
    array('label' => 'Create Film', 'url' => array('create')),
    array('label' => 'View Film', 'url' => array('view', 'id' => $model->id)),
    array('label' => 'Manage Film', 'url' => array('admin')),
);
?>

<h1>Update Film <?php echo $model->id; ?></h1>

<?php
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id' => 'film-form',
    'enableAjaxValidation' => false,
    'type' => 'horizontal',
        ));
?>

<p class="help-block">Fields with <span class="required">*</span> are required.</p>

<?php echo $form->errorSummary($model); ?>

<?php echo $form->textFieldRow($model, 'name_vn', array('class' => 'span5', 'maxlength' => 100)); ?>

<?php echo $form->textFieldRow($model, 'name_en', array('class' => 'span5', 'maxlength' => 100)); ?>
<?php
echo $form->select2Row($model, 'director', array(
    'asDropDownList' => false,
    'options' => array(
        'tags' => $directors,
        'placeholder' => 'Tìm kiếm...',
        'width' => '67.5%',
        'tokenSeparators' => array(',', '/'),
        'maximumSelectionSize' => 1
    ),
        )
);
?>
<?php
echo $form->select2Row($model, 'actor', array(
    'asDropDownList' => false,
    'options' => array(
        'tags' => $actors,
        'placeholder' => 'Tìm kiếm...',
        'width' => '67.5%',
        'tokenSeparators' => array(',', '/'),
    ),
        )
);
?>
<?php
echo $form->select2Row($model, 'country', array(
    'asDropDownList' => false,
    'options' => array(
        'tags' => $countries,
        'placeholder' => 'Tìm kiếm...',
        'width' => '67.5%',
        'tokenSeparators' => array(',', '/'),
    ),
        )
);
?>

<?php
echo $form->select2Row($model, 'tag', array(
    'asDropDownList' => false,
    'options' => array(
        'tags' => $tags,
        'placeholder' => 'Tìm kiếm...',
        'width' => '67.5%',
        'tokenSeparators' => array(',', '/'),
    ),
        )
);
?>

<?php echo $form->checkBoxListRow($model, 'genre', CHtml::listData($genres, 'id', 'name')); ?>

<?php echo $form->textFieldRow($model, 'poster', array('class' => 'span5', 'maxlength' => 100)); ?>

<?php echo $form->textAreaRow($model, 'description', array('class' => 'span5', 'maxlength' => 400)); ?>

<?php echo $form->textFieldRow($model, 'ibm_rating', array('class' => 'span2', 'maxlength' => 50)); ?>

<?php echo $form->textFieldRow($model, 'year', array('class' => 'span2', 'maxlength' => 10)); ?>

<?php echo $form->textFieldRow($model, 'runtime', array('class' => 'span2', 'maxlength' => 20, 'append' => 'phút')); ?>

<?php echo $form->dropDownListRow($model, 'quality', array('hd' => 'HD', 'full-hd' => 'Full HD', 'sd' => 'SD'), array('class' => 'span2')); ?>

<?php echo $form->textFieldRow($model, 'trailer_url', array('class' => 'span5', 'maxlength' => 200)); ?>

<?php echo $form->textFieldRow($model, 'keyword', array('class' => 'span5', 'maxlength' => 200)); ?>

<?php echo $form->dropDownListRow($model, 'type', array(Film::PHIM_LE => 'Phim lẻ', Film::PHIM_BO => 'Phim bộ'), array('class' => 'span2')); ?>

<?php echo $form->textFieldRow($model, 'no_episode', array('class' => 'span1')); ?>

<div class="form-actions">
    <?php
    $this->widget('bootstrap.widgets.TbButton', array(
        'buttonType' => 'submit',
        'type' => 'primary',
        'label' => $model->isNewRecord ? 'Create' : 'Save',
    ));
    ?>
</div>

<?php $this->endWidget(); ?>